The invention relates to a simplified Universal Serial Bus (USB) hub architecture.
The USB is a high speed serial interface used to connect a host device, such as a personal computer, to one or more peripheral devices such as printers, modems, digital cameras, etc. Throughout the development of modem computer systems, peripheral devices have had any number of different interface connector types, usually specific to the specifications of the device manufacturer. The USB architecture was designed as a universal interface that works with a wide variety of different devices made by different manufacturers.
A USB hub repeats and controls the flow of data packets between a host and one or more peripheral devices. The USB hub manages the start and end of data packet transfers and manages re-clocking and certain error conditions associated with the USB data traffic.
In the USB architecture, the host can only communicate with one downstream device at a time. The USB hub allows the host to communicate with multiple downstream devices by broadcasting a data packet or command to all of the active downstream ports/devices. The address portion of the data packet specifies the device intended to receive the command, provide the service, or send the reply. The downstream device associated with the USB packet sends a reply data packet back upstream to the host. The upstream data packet is only received by the host and is not broadcast to the other downstream ports.
After broadcasting the downstream packet for a transaction in which the host expects a response from a downstream device, the host does not send any further data until a reply is received back from the targeted downstream device or until a defined response period has lapsed without receiving a reply. The maximum allowable response period is usually defined as the maximum amount maximum allowable response period is usually defined as the maximum amount of time that an electronic signal requires to propagate back and forth from the host to the most remote downstream device.
If the response period lapses, the host may either resend the data packet or assume the downstream device is not functioning correctly and cease transmission to that downstream device. In either case, in a proper functioning USB system, there is only one active downstream data packet sent from the host or one active upstream data packet sent from one of the downstream device being transmitted at any given time.
Thus, in a properly functioning USB system, only one downstream device should ever be transmitting upstream data traffic at any given time. However, during a malfunction, two downstream devices might send overlapping upstream data packets. For example, the transmission of a second upstream data packet may commence before a first upstream data packet finished transmission. This is not supposed to occur in a properly functioning USB system; however, a faulty downstream device may send false data, or an incorrectly wired USB system may cause a delay in the downstream device response time. The industry standard Universal Serial Bus Specification Revision 2.0 (USB 2.0) requires the USB hub to detect these error conditions.
The USB 2.0 specification allows the USB hub to operate in two different ways when a collision is detected. The USB hub can “garble” upstream messages so that the host is informed there is a problem. The USB hub can alternatively block the overlapping packets so that only the first received upstream data packet is passed through to the host.
The USB 2.0 specification recommends designing USB systems that garble the upstream messages during collision conditions. This provides notice to the host and allows the host to determine any appropriate remedial actions that need to take place. This technique is favorable since the blocking technique might mislead the host into accepting a false reply from the malfunctioning device (e.g. as a result of a faulty device or faulty bus). The blocking technique could also result in the host reestablishing connectivity at the conclusion of the first data packet and mid-stream through the second data packet. The blocking technique also allows data packets to be lost or dropped without notifying the host.
Existing USB hub repeaters use elasticity buffers for each port. The elasticity buffers include Start Of High speed data Packet (SOHP) logic that identifies when a valid data packet is being transmitted. When two elasticity buffers associated with two different ports each identify a SOHP event is occurring (e.g., upstream packets are being received on two different ports at the same time), the hub responds by sending the garbled message to the host. The elasticity buffers also handle data latency and frequency variation between different clock domains, and also include the SOHP logic that identify the beginning and end of received packets.
As described above, valid data should only arrive at one port at any given time (the active port). Therefore, only one elasticity buffer should be active at any given time. The SOHP logic is the only part of the elasticity buffer used in the non-active ports. The extra circuitry used for the underutilized elasticity buffers increases the complexity and cost of the USB hub.